import 'package:flutter/material.dart';

abstract class IView {
  ///获取上下文
  BuildContext getContext();

  /// 显示加载
  void showLoading({String msg, bool canDimiss});

  /// 取消加载
  void cancelLoading();

  /// 展示Toast
  void showToast(String str);

  /// 展示error
  void showError(String str);

  /// 更新状态widget
  void updateStateWidget();
}

abstract class IPresenter {
  void initState();

  void buildComplete();

  void didChangeDependencies();

  void didUpdateWidget(oldWidget);

  void deactivate();

  void dispose();
}
